'use strict';
let Koa = require('koa');

let bodyParser = require('koa-bodyparser');

let conn=require('./controllers');

let templating =require('./templating');

let app=new Koa();

app.use(bodyParser());

app.use(conn());

app.use(templating);

app.use(async(ctx,next)=>{
    ctx.render('hello.html',{name:'姓名陈森，学号1922010103'});
})


let port = 5000;
app.listen(port);
console.log(`http://localhost:${port}`);